﻿@using Happy.Cms.Query.Articles
@using Happy.ExtentionMethods
@using Ciep.WebSite.Models
@using System.Web.Mvc

@helper RenderArticle(ArticleView article)
{
    <div class="happy-article-detail">
        <h2>@article.Title</h2>
        @if (!string.IsNullOrWhiteSpace(article.ImageInfo_Url))
        {
            <img src="@article.ImageInfo_Url" class="img-thumbnail">
        }

        @MvcHtmlString.Create(article.Content)
    </div>
}

@helper RenderPagedArticles(PagedArticles pageInfo)
{
    <ul class="list-unstyled happy-article-list">
        @foreach (var article in pageInfo.Articles.Items)
        {    
            <li><a href="@pageInfo.DetailHref@article.Id" title="@article.Title">@article.Title</a></li>
        }
    </ul>
    @PageHelper.RenderPageBar(pageInfo)
}